<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pGrid.jsp" %>
<title>库存统计</title>
<script>
	$(function(){
		/*列表初始化*/
		var gridParam = {
			url:"/console/com.fs.jzzn.pojo.Stock/list",
			columns : [ [
	               {field : "mNo",width : 120,	title : "物料编码"},
	               {field : "mName",width : 200,	title : "物料名称"},
	               {field : "mType",width : 150,	title : "物料规格"},
	               {field : "mCount",width : 100,	title : "库存数量"},
	               {field : "mUnit",width : 100,	title : "数量单位"},
	               {field : "warehouseName",width : 120,	title : "仓库名称"}, 
	               {field : "location",width : 150,	title : "库位"},
	               {field : "mKind",width : 150,	title : "物料类别"}
			] ],
			singleSelect : true
		};
		p.dataGrid = $(p.dataGrid).datagrid( $.extend({}, p.dataGridParam, gridParam));

		/*事件响应*/
		$("#toolbar .easyui-linkbutton").on("click", function() {
			var id = $(this).attr("motion_code");
			var flag = $(this).hasClass("l-btn-disabled");
			if(flag) return ;
			switch (id) {
				case "05":
					p.gridQuery();
					break;
				case "07":
					p.down({filename:'库存统计'});
					break;
				default: break;
			}
		});
	});
</script>
</head>
<body  class="easyui-layout">
		<!-- 但行高度33px，多行时 33乘以行数  -->
		<div id="querybar" data-options="region:'north',split:false,border:false" style="height:33px;">
			<div class="easyui-panel" data-options="fit:true,border:false">
				<!-- 查询条件表单，根据配置进行替换  -->
				<form id="queryForm" >
				 <input type="hidden" name="className" value="com.fs.jzzn.pojo.Stock" />
				  <div style="margin-top:5px;margin-left:10px;float:left;">
				  	<input class="easyui-textbox" name="mNo" style="width:180px;" data-options="label:'物料编码:',required:false,labelWidth:60" />
					<input type="hidden" name="mNo_searchType" value="like" />
				 </div>
				 <div style="margin-top:5px;margin-left:10px;float:left;">
				  	<input class="easyui-textbox" name="mName" style="width:180px;" data-options="label:'物料名称:',required:false,labelWidth:60" />
					<input type="hidden" name="mName_searchType" value="like" />
				 </div>
				  <div style="margin-top:5px;margin-left:10px;float:left;">
				  	<input class="easyui-textbox" name="warehouseName" style="width:180px;" data-options="label:'仓库名称:',required:false,labelWidth:60" />
					<input type="hidden" name="warehouseName_searchType" value="like" />
				 </div>
				 <div style="margin-top:5px;margin-left:10px;float:left;">
				  	<input class="easyui-textbox" name="location" style="width:180px;" data-options="label:'库位:',required:false,labelWidth:40" />
					<input type="hidden" name="location_searchType" value="like" />
				 </div>
				</form>
			</div>
		</div>  
	
		<!-- 工具栏按钮 -->
		<div id="toolbar" class="easyui-panel" style="padding:3px;"></div>
		
		<!-- 表格 -->
		<div region="center" border="false">
			<table id="dataGrid"></table>
		</div>
</body>
</html>